package com.example.administrator.mobile;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class QqtjActivity extends AppCompatActivity {

    EditText name;
    EditText number;
    Button bt1;
    Button bt2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_qqtj);

        name = findViewById(R.id.tv_name);
        number = findViewById(R.id.tv_number);
        bt1 = findViewById(R.id.btn_tj);
        bt2 = findViewById(R.id.btn_tj1);

        bt1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (name.getText().toString().equals("admin")&&number.getText().toString().equals("123")){
                }else {
                    Toast.makeText(QqtjActivity.this,"添加成功",Toast.LENGTH_SHORT).show();
                }

            }
        });

    }
    public void bt2(View view) {
        Intent intent = new Intent(QqtjActivity.this,QqshActivity.class);
        startActivity(intent);
    }

    public void bt1(View view) {
        Intent intent = new Intent(QqtjActivity.this,QqshActivity.class);
        startActivity(intent);
    }
}
